<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>选择器</title>
    <style>
        /*id选择器*/
        #p1{color: red}
        /*类选择器*/
        .c1{color: orange}
        /*分组选择器*/
        #p1,.c1,h3 {background-color: lavender}
        /*属性选择器*/
        input[type='text']{background-color: honeydew}
        /*任意元素选择器*/
        *{border: 1px solid blue}
    </style>
</head>
<body>

<input type="text">
<input type="password">

<p id="p1">悟空</p>
<p >八戒</p>
<p class="c1">沙僧</p>

<div>苹果</div>
<div>香蕉</div>
<div class="c1">橘子</div>

<h3>这是h3</h3>

</body>
</html>